<!-- components/SvgIcon.vue -->
<template>
  	<view :class="'iconfont ' +name " :style="styles"></view>
</template>

<script>

export default {
  props: {
    name: { type: String, required: true,default:"icon-wodexiao" }, // 图标文件名
    size: { type: [Number, String], default: 24 }, // 图标尺寸
    color: { type: String, default: 'currentColor' }, // 颜色继承
  },
  computed: {
    styles() {
      return {
        width: this.size + 'px',
        height: this.size + 'px',
        color: this.color,
		textAlign:'center'
		
      }
    },
    
  }
}
</script>